package com.aspose.cells;

class zajo {
   private String a;
   private zoz b;
   private zbmv c;
   private zbmu d;
   private String e;
   private static final com.aspose.cells.b.c.a.za f = new com.aspose.cells.b.c.a.za(new String[]{"pivotCacheId", "sortOrder", "customListSort", "crossFilter", "showMissing", "x", "s", "nd", "tabId", "name", "sourceName"});

   zajo(zoz var1, String var2, String var3) {
      this.e = var3;
      this.b = var1;
      this.a = var2;
      this.c = var1.a.getWorksheets().W();
   }

   void a(zcfw var1) throws Exception {
      this.d = new zbmu(this.c);
      this.d.a = this.e;
      this.c.a(this.d);
      this.f(var1);
      if (!var1.n()) {
         if ("slicerCacheDefinition".equals(var1.p()) && var1.r() == 1) {
            this.e(var1);
         }

         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if ("pivotTables".equals(var1.p()) && var1.r() == 1) {
                  this.c(var1);
               } else if ("data".equals(var1.p()) && var1.r() == 1) {
                  this.b(var1);
               } else if ("extLst".equals(var1.p()) && var1.r() == 1 && !var1.n()) {
                  this.d.f = var1.u();
               }
            }

            return;
         }
      }
   }

   private void b(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if ("tabular".equals(var1.p()) && var1.r() == 1) {
                  this.d.g = 1;
                  this.a(var1, this.d);
               } else if ("olap".equals(var1.p()) && var1.r() == 1) {
                  if (!var1.n()) {
                     this.d.g = 0;
                     this.d.o = var1.u();
                  }
               } else {
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void a(zcfw var1, zbmu var2) throws Exception {
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            switch(f.a(var1.p())) {
            case 0:
               var2.h = zase.D(var1.s());
               break;
            case 1:
               if ("descending".equals(var1.s())) {
                  var2.i = 1;
               } else {
                  var2.i = 0;
               }
               break;
            case 2:
               if ("0".equals(var1.s())) {
                  var2.j = false;
               } else {
                  var2.j = true;
               }
               break;
            case 3:
               if ("none".equals(var1.s())) {
                  var2.k = 0;
               } else if ("showItemsWithNoData".equals(var1.s())) {
                  var2.k = 2;
               } else {
                  var2.k = 1;
               }
               break;
            case 4:
               if ("0".equals(var1.s())) {
                  var2.l = false;
               } else {
                  var2.l = true;
               }
            }
         }
      }

      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if ("items".equals(var1.p()) && var1.r() == 1) {
                  this.b(var1, var2);
               } else if ("extLst".equals(var1.p()) && var1.r() == 1) {
                  if (!var1.n()) {
                     var2.n = var1.u();
                  }
               } else {
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void b(zcfw var1, zbmu var2) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("i".equals(var1.p()) && var1.r() == 1) {
                  this.c(var1, var2);
               } else {
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void c(zcfw var1, zbmu var2) throws Exception {
      zbmx var3 = new zbmx(var2.e());
      var2.e().a(var3);
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            switch(f.a(var1.p())) {
            case 5:
               var3.a = zase.C(var1.s());
               break;
            case 6:
               if ("1".equals(var1.s())) {
                  var3.b = true;
               } else {
                  var3.b = false;
               }
               break;
            case 7:
               if ("1".equals(var1.s())) {
                  var3.c = true;
               } else {
                  var3.c = false;
               }
            }
         }
      }

      var1.a();
   }

   private void c(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("pivotTable".equals(var1.p()) && var1.r() == 1) {
                  this.d(var1);
               } else {
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void d(zcfw var1) throws Exception {
      zbmz var2 = new zbmz(this.d.j());
      this.d.j().a(var2);
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            switch(f.a(var1.p())) {
            case 8:
               var2.a(zase.C(var1.s()));
               break;
            case 9:
               var2.a(var1.s());
            }
         }
      }

      var1.a();
   }

   private void e(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         if (var1.m()) {
            while(var1.l()) {
               switch(f.a(var1.p())) {
               case 9:
                  this.d.a(var1.s());
                  break;
               case 10:
                  this.d.e = var1.s();
               }
            }

            var1.k();
         }

      }
   }

   private void f(zcfw var1) throws Exception {
      var1.j();
      if (var1.r() != 1 || !"slicerCacheDefinition".equals(var1.p())) {
         throw new IllegalStateException("slicerCacheDefinition root element eror");
      }
   }
}
